/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DAO;

import POJO.Store;
import Util.DataAccessUtil;
import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author roseinlove09
 */
public class StoreDAO {
    public static Store getStore(int idStore) throws Exception{
        String hql = "SELECT s from Store s WHERE s.id = :idStore"; 
        Map<String,Object> params = new HashMap();
        params.put("idStore", idStore);
        return (Store) DataAccessUtil.getFirstResult(hql,params);
    }
}
